<?php
	if(isset($_GET['tt']))
	{
		$id_tt = $_GET['tt'];
		$row = mysql_fetch_array(mysql_query("  SELECT a.id,topic,content_sum,avatar,content,full_name,category_id
											    FROM news a join category b on a.category_id = b.id
												WHERE a.id = '$id_tt' "));
		$cate_id = $row['category_id'];
		$query = mysql_query(" SELECT id,topic FROM news WHERE category_id = '$cate_id' AND id != '$id_tt' LIMIT 0,3 ");
?>
<div style="border:1px solid #CCC; margin:0px 5px;">
	<div class="new"> <?php echo ucwords($row['full_name']); ?> </div>
	<div class="new_img"> <img src="img/upload/<?php echo $row['avatar']; ?>" width="130px" height="100px" /> </div>
    <div class="new_topic"> <?php echo ucfirst($row['topic']); ?> </div>
    <div class="new_content_sum"> <?php echo ucfirst($row['content_sum']); ?> </div>
    <div class="clear"> </div>
    <div class="new_content"> <?php echo $row['content']; ?> </div>
</div>
<div style='margin:20px 0px 10px 0px;'>
	<b style="color:#000;"> Tag</b>: 
    	<a href="index.php">luyen thi dai hoc</a>, 
        <a href="index.php">luyện thi đại học ở cần thơ</a>, 
        <a href="index.php">73 hùng vương</a>, 
        <a href="index.php">trung tâm luyện thi 73 hùng vương</a>
</div>
<div class="new_rela">
	<div class="new_rela_topic"> Tin liên quan </div>
	<?php 
		if(mysql_num_rows($query) > 0)
		{
			while($res = mysql_fetch_array($query))	
			{
				echo " <li> <a href='p_tin-tuc_".$res['id']."_".$res['topic'].".html'> <img src='img/pic/icon1.gif' /> ".$res['topic']." </a> </li> ";	
			}
		}
	?> 
</div>
<?php } ?>